;	nasm -f win32 -o main1.o main.asm
;	gcc -o main1.exe main1.o -L. -lsnake

cpu 386

extern _printf
extern _puts
extern _malloc
extern _fill_matrix_snake

extern _init_matrix

global _main

section code use32 class=code

section	.bss use32 class=code

section	data use32 class=code
	fmt1	dd "esp: 0x%X ", 0x0d, 0x0a, 0x00
	fmt2	dd "esp1: 0x%X esp2: 0x%X ", 0x0a, 0x00

_main:
	push	ebp
	mov		ebp, esp
	and		esp, -16
	sub		esp, 32
	
	mov		[ebp-4], esp
	mov		eax, [ebp-4]
;	push	eax
;	push	fmt1
	mov		dword [esp+4], eax
	mov		dword [esp], fmt1
	call	_printf
	
	;call	_init_matrix

	mov		[ebp-8], esp
	mov		eax, [ebp-8]
;	push	eax
;	push	fmt1	
	mov		dword [esp+4], eax
	mov		dword [esp], fmt1
	call	_printf
	
;	mov		eax, esp
;	push	eax
;	push	fmt1	
;	call	_printf
	
;	mov		eax, esp
;	push	eax
;	push	fmt1	
;	call	_printf
	
	xor		eax, eax

	leave
	ret
